<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta charset="UTF-8">
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/css/base.css">
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/css/style.css">
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-2.1.4.min.js"></script>
		<title></title>
	</head>
	<body>
	<form class="form form-horizontal" action="${pageContext.request.contextPath}/manager/login.html" method="post">
		<div class="login_page">
			<div class="login_mian">
				<img src="${pageContext.request.contextPath}/images/images/logo.png" class="logo_img">
				<div class="login_box">
				<div class="myform">
						<p><i>账号:</i><input type="text"  name="wAUsername" id="username"/></p>
  						<p><i>密码:</i><input type="password" name="wAPassword" id="password"/></p>
  						<p><i>验证码:</i><input type="text" class="yzm"  name="vcode" onchange="ver()"/>
  						<span class="yzm_img"><img src="${pageContext.request.contextPath}/ImageCodeMakerServlet" id="codeImg">
  						<a id="kanbuq" onClick="reImg()">看不清，换一张</a></span></p>
  						<p class="login_btn"><input type="checkbox" checked="checked" class="checked">下次自动登录
  						<input type="button" value="注册" class="register" id="register">
  						<input type="submit" value="登陆" class="sign" ></p>
  				</div>
				</div>
				<div class="copyright">copyright@版权所有 重庆阳伞网络科技-嘿管家</div>
			</div>
		</div>
	</form>
	
<script type="text/javascript" src="${pageContext.request.contextPath}/lib/jquery/1.9.1/jquery.min.js?v=0.1"></script> 
<script type="text/javascript" src="${pageContext.request.contextPath}/js/H-ui.js?v=0.1"></script> 
<script type="text/javascript">  
        function reImg() {  
            var codeImg = document.getElementById("codeImg");  
            codeImg.src = "${pageContext.request.contextPath}/ImageCodeMakerServlet?rnd=" + Math.random();  
        }  
    	$("#register").click(function(){
    		window.location = "${pageContext.request.contextPath}/manager/register.html";
    	});
    	var sign = true;
    	function login() {
    		var username = $('#username').val();
    		var password = $('#password').val();
    		if(username != '') {
    			
    		}
    	}
    	function ver() {
    		var vcode = $('#vcode').val();
    		$.ajax({
    		    type: "GET",
    		    url: "/verityCode/"+ vcode + ".json",
    		    dataType: "json",
    		    success: function(data){
    		             if(data == 0) {
    		            	alert("验证码不正确");
    		             } 
    		    }
    		});
    	}
</script>  

	</body>
</html>